import React from 'react'
import uuid from 'uuid'
import PropTypes from 'prop-types'

class MenuItem extends React.Component {
    constructor(props) {
        super(props) 
        this.state = {

        }
    }

    render() {
        return (
            <li className="sidebar-item m-b-5">
                <a className="sidebar-link has-arrow waves-effect waves-dark active" href="javascript:void(0)" aria-expanded="false" onClick={(e,arg1)=>{
                    $('.sidebar-item').removeClass('selected')
                    $('.sidebar-link').removeClass('selected')
                    $(e.target).parents('.sidebar-item').addClass('selected')

                }}>
                    <i className="icon-Car-Wheel"></i>
                    <span className="hide-menu">{this.props.menuName}</span>
                </a>

                <ul aria-expanded="false" className="collapse first-level">
                    {this.props.children}
                </ul>
            </li>
        )
    }
}

export default MenuItem